CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)

# create solution
PROJECT(GEngine)

# specify cmake include directory
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMake)

# include all cmake modules
INCLUDE(GCMake)
INCLUDE(GTarget)
INCLUDE(GVersion)
INCLUDE(GPlatform)
INCLUDE(GCompiler)
INCLUDE(GUtilities)
INCLUDE(GSubversion)
INCLUDE(GBuildConfig)
INCLUDE(GArchitecture)

# check if it is in source build
CHECK_BUILD_PATH()

# configure build
GConfigureCMake()
GConfigurePlatform()
GConfigureCompiler()
GConfigureArchitec()
GConfigureVersion()
GConfigureBuildConfig()

# add subdirectories
# let externals get processed first
ADD_SUBDIRECTORY(Externals)
ADD_SUBDIRECTORY(Source)
ADD_SUBDIRECTORY(CMake)

MESSAGE("")
MESSAGE("")
MESSAGE("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< CMAKE TODOs >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
MESSAGE("TODO: Implement debug and release configurations for externals.")
MESSAGE("TODO: Figure out module versioning using SVN and CMAKE.")
MESSAGE("TODO: Configure CMAKE so that RunDir directory is added as an executable directory.")
MESSAGE("TODO: Figure out cross compiling and ecide target architecture based on the needs that will populate.")
MESSAGE("TODO: Add option to enable or disable graphics debugging.")
MESSAGE("TODO: Create a cmake generated source file which links the static modules to main project.")
MESSAGE("TODO: Copy necessary dlls into executable directory. Maybe unnecessary.")
MESSAGE("TODO: Copy headers libs and dlls to Output directory. Try to solve this by CMAKE INSTALL ?")
MESSAGE("TODO: AddLibrary() method should accept header files seperated such as PUBLIC PRIVATE INTERFACE.")
MESSAGE("TODO: Configure compiler flags based on build configuration in GConfigureBuildConfig().")
MESSAGE("TODO: Create custom target for shaders under each graphic module.")
MESSAGE("TODO: Find a way to compile and store shader binaries(maybe at cmake_binary_dir or at Rundir) at compile time?")
MESSAGE("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< CMAKE TODOs >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
MESSAGE("")
MESSAGE("")
